package cn.leonis.consumer01.config;

import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.netflix.eureka.EurekaDiscoveryClient;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;

@Component
public class BaseConfig {

    @Bean
    // @LoadBalanced // 通过注解调用服务必须
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }

/*    @Bean
    public DiscoveryClient discoveryClient() {
        return new EurekaDiscoveryClient()
    }*/
}
